﻿#include "geoopewidget.h"

#include<QLayout>
GeoOpeWidget::GeoOpeWidget(QWidget *parent) : QWidget(parent)
{
    loadUI();
}

void GeoOpeWidget::loadUI()
{

    QVBoxLayout * qvb = new QVBoxLayout();
    lineBtn.setText(QString::fromLocal8Bit("线段"));
    lineBtn.setParent(this);

    cBtn.setText(QString::fromLocal8Bit("圆"));
    cBtn.setParent(this);

    edgeBtn.setText(QString::fromLocal8Bit("多边形"));
    edgeBtn.setParent(this);

    editBtn.setText(QString::fromLocal8Bit("编辑"));
    editBtn.setParent(this);

    qvb->addWidget(&lineBtn);
    qvb->addWidget(&cBtn);
    qvb->addWidget(&edgeBtn);
    qvb->addWidget(&editBtn);
    qvb->setSizeConstraint(QLayout::SetFixedSize);
    setLayout(qvb);

 //   QGridLayout *gridLayout = new QGridLayout;
//   gridLayout->setRowMinimumHeight(0,2);
//    gridLayout->setColumnStretch(1, 1);
//    gridLayout->setColumnStretch(2, 1);
//    gridLayout->setColumnStretch(3, 1);

//    gridLayout->addWidget(&lineBtn,0,0);
//    gridLayout->addWidget(&cBtn,1,0);
//    gridLayout->addWidget(&edgeBtn,2,0);
//    setLayout(gridLayout);
}

